<?php
if (isset($query) && count($query) > 0) {
    ?>
    <h1>Data Guru</h1>
    <table width="400" border="1" class="table table-striped">
        <thead>
            <tr>
                <th>#</th>
                <th>Kelas</th>
                <th>Materi</th>
                <th>Type Soal</th>
                <th>Jumlah Soal</th>
                <th>Jumlah Opsi</th>
                <th>Mode Acak</th>
                <th>Waktu</th>
                <th>Detail</th>
                <th>Edit</th>
                <th>Delete</th>
            </tr>
        </thead>
        <?php
        $i = 0;
        foreach ($query as $row) {
            $i++;
            echo "<tr class=\"record\">";
            echo "<td>$i</td>";
            echo "<td>$row->kelas</td>";
            echo "<td>$row->materi</td>";
            echo "<td>$row->type_soal</td>";
            echo "<td>$row->jumlah_soal</td>";
            echo "<td>$row->jumlah_opsi</td>";
            echo "<td>$row->mode_acak</td>";
            echo "<td>$row->waktu</td>";
            echo "<td>".anchor('guru/detsoallaunch/'.$row->id.'','Detail')."</td>";
            echo "<td><a href='" . base_url() . "guru/editsoal/$row->id'>Edit</a></td>";
            echo "<td><a href='" . base_url() . "guru/delconfsoal/$row->id' class='fancybox fancybox.iframe input'>Delete</a></td>";
            echo "</tr>";
        }
        ?>
    </table>
    <?php
}
?>